package com.ajim.boot.tomcat;

import org.apache.catalina.startup.Tomcat;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;

public class SpringApplication {
    private static Log log = LogFactory.getLog(SpringApplication.class);
    Tomcat tomcat8 = null;
    public void run() throws Exception {
        tomcat8 = new Tomcat();
        tomcat8.setPort(8080);
        tomcat8.addWebapp("/", "D:/"); //webapp
        tomcat8.getConnector().setURIEncoding ("UTF-8");
        tomcat8.start ();
        tomcat8.getServer().await();
    }
}
